Early computer systems were capable of only performing a single task or process at a time. Computer resources in such single tasking environments, such as magnetic storage, tape, printers, etc, were used exclusively by the single task currently running on the computer system. When the task completed, the computer resources were available for the next task that would run on the computer system. There is no reason to "lock" a computer resource in such an environment, since only one task is executing at a time. Stated another way, the granularity of the "lock" of a computer resource could be considered to be at the level of the computer system itself.
The DOS operating system is an example of the simple world of a single tasking environment that existed in the personal computer industry for many years. But computer users demanded more powerful computers that had the ability to perform multiple tasks or processes at one time. Much more complex operating systems, such as UNIX, Windows, and OS/2, gave users the ability to perform many different tasks concurrently. For example, a Windows user could now display more than one "window" on his computer display. Each window has the independent ability to ask the computer to execute its task. Therefore, if more than one window requested that the computer execute its task at the same time, the computer would be operating in a multitasking mode.
When computers operate in multitasking mode, care must be taken to assure that a computer resource can be responsibly shared between tasks. Windows and OS/2 control access to a resource by "locking" out all other tasks when one task is using the resource. For example, a Windows user may be running Lotus 1-2-3 in one window and TurboTax in another window. Both Lotus 1-2-3 and TurboTax may independently be trying to execute a task that uses the magnetic storage device to write data to the same storage location at the same time. Windows would prevent the possible loss or corruption of data from this occurring by denying TurboTax the ability to write to the magnetic storage device if Lotus 1-2-3 was using it. The granularity of the computer resource lock used by UNIX, Windows and OS/2 is at the level of the task or process.
While lock granularity at the task or process level is adequate for multitasking computer systems known today, computer users will soon once again be demanding more power and speed from their computer systems. Lock granularity at the task or process level may impose a restriction on increasing the power and speed of computer systems to a level deemed necessary by computer users, or it may impact the data integrity, system integrity, or operation of these more powerful systems.